﻿package com.myp.share
{
    import flash.net.*;

    public class Share extends Object
    {
        public static var url:String = "Sin url";
        private static var _url:String;
        public static var title:String = "Sin titulo";
        private static var _title:String;
        public static var description:String = "Sin descripcion";
        private static var _description:String;

        public function Share()
        {
            return;
        }// end function

        public static function mySpace() : void
        {
            escapeAll();
            var _loc_1:* = "http://www.myspace.com/Modules/PostTo/Pages/?u=" + _url;
            navigateToURL(new URLRequest(_loc_1), "_blank");
            say("MySpace : " + _loc_1);
            return;
        }// end function

        public static function facebook() : void
        {
            escapeAll();
            var _loc_1:* = "http://www.facebook.com/sharer.php?u=" + _url + "&t=" + _title;
            navigateToURL(new URLRequest(_loc_1), "_blank");
            say("Facebook : " + _loc_1);
            return;
        }// end function

        private static function escapeAll() : void
        {
            _title = escape(title);
            _description = escape(description);
            _url = escape(url);
            return;
        }// end function

        private static function say(param1:String) : void
        {
            trace("<<< COMPARTIR : " + param1 + " >>>");
            return;
        }// end function

        public static function twitter() : void
        {
            escapeAll();
            var _loc_1:* = "http://twitter.com/home?status=" + _title + " " + _url;
            navigateToURL(new URLRequest(_loc_1), "_blank");
            say("Twitter : " + _loc_1);
            return;
        }// end function

    }
}
